//import bobsrockets.navigation.Navigator
//import bobsrockets.navigation.tests.NavigatorSuite

//import bobsrockets.navigation.{MissionControl}


//package bobsrockets {
//  package navigation {
//    // 在bobsrockets.navigation包中
//    class Navigator {
//      val name: String = "Navigator"
//
//      override def toString: String = "my name is " + name
//    }
//
//    // 在bobsrockets.navigation.tests包中
//    package tests {
//      class NavigatorSuite {
//        override def toString: String = "my name is NavigatorSuite"
//      }
//    }
//  }
//}


//package bobsrockets.navigation {
//  // 在bobsrockets.navigator包里
//  class Navigator
//
//  package tests {
//    // 在bobsrockets.navigator.tests包里
//    class NavigatorSuite
//  }
//}


//package bobsrockets {
//  package navigation {
//    class Navigator {
//      override def toString: String = "Navigator"
//    }
//  }
//
//  package launch {
//    class Booster {
//      // 不用写bobsrockets.navigation.Navigator
//      val nav = new navigation.Navigator
//      override def toString: String = "Booster"
//    }
//  }
//}


//package bobsrockets {
//  package navigation {
//    package launch {
//      class Booster1
//    }
//
//    class MissionControl {
//      val booster1 = new launch.Booster1
//      val booster2 = new bobsrockets.launch.Booster2
//      val booster3 = new _root_.launch.Booster3
//    }
//  }
//
//  package launch {
//    class Booster2
//  }
//}


// 精确控制
package bobsrockets {
  package navigation {
    private[bobsrockets] class Navigator {
      protected[navigation] def useStarChart() {}
      class LegOfJourney {
        private[Navigator] val distance = 100
      }
      private[this] var speed = 200
    }
  }
  package launch {
    import navigation._
    object Vehicle {
      private[launch] val guide = new Navigator
    }
  }
}


object Navigator {

  def main(args: Array[String]): Unit = {
//    val na = new Navigator
//    println(na)
//    val nasu = new NavigatorSuite
//    println(nasu)

//    val miss = new MissionControl
//    println(miss.booster1)
//    println(miss.booster2)
//    println(miss.booster3)
  }
}